home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / overview / win2maccountersamples / 3. counterdialog / source / ccounterapp.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  1.5 KB  |  46 lines

  1. /*
  2.     File:        CCounterApp.h
  3.  
  4.     Contains:    Sample code to accompany Chapter 12 of 
  5.                 "An Introduction to Macintosh Programming for Windows Programmers".
  6.                 
  7.     Written by:    Worldwide Developer Technical Support
  8.  
  9.     Copyright:    1999 Apple Computer, Inc., All Rights Reserved
  10.  
  11.       You may incorporate this sample code into your applications without
  12.       restriction, though the sample code has been provided "AS IS" and the
  13.       responsibility for its operation is 100% yours.  However, what you are
  14.       not permitted to do is to redistribute the source as "DSC Sample Code"
  15.       after having made changes. If you're going to re-distribute the source,
  16.      we require that you make it clear in the source that the code was
  17.     descended from Apple Sample Code, but that you've made changes.
  18.     
  19. */
  20. #pragma once
  21. #include <LApplication.h>
  22.  
  23. #include "CCounter.h"
  24.  
  25. class LStaticText;
  26. class Lcaption;
  27.  
  28. // ====================================================================================
  29. class    CCounterApp : public LApplication {
  30. public:
  31.                             CCounterApp();        // constructor registers all PPobs
  32.         virtual             ~CCounterApp();        // stub destructor
  33. // overrides    
  34.         virtual Boolean        ObeyCommand(CommandT inCommand, void* ioParam);    
  35.         virtual void        FindCommandStatus(CommandT inCommand,
  36.                                     Boolean &outEnabled, Boolean &outUsesMark,
  37.                                     Char16 &outMark, Str255 outName);
  38. protected:
  39.         virtual void        StartUp();
  40. // new members
  41.         virtual LWindow*    MakeControlsWindow();
  42.         virtual    Boolean        AskForValue(Int32& newValue);
  43. private:
  44.         CCounter            fCounter;
  45.         LCaption*            fCaption;
  46. };